<template>
  <div>
    <h1>App</h1>
    <A />
  </div>
</template>

<script>
import A from "./A";

export default {
  name: "App",
  components: {
    A,
  },
  data() {
    return {
      count: 0,
    };
  },
  // 1. 通过 provide 提供数据
  provide() {
    return {
      count: this.count,
    };
  },
};
</script>

<style></style>
